package com.example.big_orange2.utils;

import com.example.big_orange2.entity.RSAkey;

import java.util.Map;

public class RSA_keyutils {
    public  RSAkey createkey(){
        // 生成公私钥
        RSAkey rsakey = new RSAkey();
        Map<String, String> rsaKeys = RSAutils.createRSAKeys();
        rsakey.setPublicKey(rsaKeys.get(RSAutils.PUBLIC_KEY_NAME));
        System.out.println("publicKey:"+ rsaKeys.get(RSAutils.PUBLIC_KEY_NAME));
        rsakey.setPrivateKey(rsaKeys.get(RSAutils.PRIVATE_KEY_NAME));
        System.out.println("privateKey:"+ rsaKeys.get(RSAutils.PRIVATE_KEY_NAME));
        return rsakey;
    }
}
